/*
 * @Author: 
 * @Date: 2024-01-01 18:45:45
 * @LastEditor: zhuxiaoyi
 * @LastEditTime: 2024-01-01 18:49:48
 * @Description: 
 */
import * as fs from 'fs';

export class CommonUtils {
  static async getFileSize(filePath: string): Promise<number> {
    return new Promise((resolve, reject) => {
      fs.stat(filePath, (err, stats) => {
        if (err) {
          reject(err);
        } else {
          resolve(stats.size);
        }
      });
    });
  }
}

